package org.example;

import org.example.parm.InClass;
import org.example.parm.OutClass;
import org.example.search.strategy.first.ABTitleSort;
import org.example.search.strategy.first.TitleSort;

public class RootMapper implements AbstractStrategyRouter.StrategyMapper<InClass, OutClass> {
    @Override
    public StrategyHandler<InClass, OutClass> get(InClass param) {
        switch (param.getType()){
            case 1:
                return (StrategyHandler<InClass, OutClass>) new ABTitleSort();
            case 2:
                return (StrategyHandler<InClass, OutClass>) new TitleSort();
        }
        return null;
    }

}